package dk.modified.reshary;

import android.os.Parcel;
import android.os.Parcelable;


public class CategorySub implements Parcelable {
	
	private int categoryId;
	private String categoryName;
	private int parent;

	
	
	public CategorySub(int categoryId, String categoryName, int parent) {
		this.categoryId = categoryId;
		this.categoryName = categoryName;
		this.parent = parent;
	}

	
	private CategorySub(Parcel in) {
		categoryId = in.readInt();
		categoryName = in.readString();
		parent = in.readInt();
	}
	

	public int getParentId() {
		return parent;
	}

	public int getCategoryId() {
		return categoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}


	@Override
	public int describeContents() {
		return 0;
	}


	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(categoryId);
		dest.writeString(categoryName);
		dest.writeInt(parent);

	}
	
	public static final Parcelable.Creator<CategorySub> CREATOR = new Parcelable.Creator<CategorySub>() {
		public CategorySub createFromParcel(Parcel in) {
			return new CategorySub(in);
		}

		public CategorySub[] newArray(int size) {
			return new CategorySub[size];
		}
	};
	
}
